From a4c5438431613f9b1b24524804354be18ebd3063 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 24 Jul 2015 14:37:03 -0700 Subject: [PATCH] Tweak metadata to publish Cargo on crates.io This commit tweaks some metadata here and there to publish Cargo on crates.io. * License fields are added to Cargo.tomls * `registry` was renamed to `crates-io` * API docs for the `cargo` crate are now generated via `make doc` --- Cargo.lock | 34 ++++++++++++++++++++---------- Cargo.toml | 11 ++++++++-- Makefile.in | 6 +++++- src/cargo/lib.rs | 2 +- src/crates-io/Cargo.toml | 17 +++++++++++++++ src/{registry => crates-io}/lib.rs | 0 src/registry/Cargo.toml | 12 ----------- 7 files changed, 55 insertions(+), 27 deletions(-) create mode 100644 src/crates-io/Cargo.toml rename src/{registry => crates-io}/lib.rs (100%) delete mode 100644 src/registry/Cargo.toml diff --git a/Cargo.lock b/Cargo.lock index efdea8294..63a086d32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,6 +4,7 @@ version = "0.4.0" dependencies = [ "advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "bufstream 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crates-io 0.1.0", "curl 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.6.67 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -12,14 +13,13 @@ dependencies = [ "git2 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "git2-curl 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)", + "hamcrest 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "registry 0.1.0", "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", @@ -59,6 +59,14 @@ name = "bufstream" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "crates-io" +version = "0.1.0" +dependencies = [ + "curl 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "curl" version = "0.2.10" @@ -155,7 +163,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hamcrest" version = "0.1.0" -source = "git+https://github.com/carllerche/hamcrest-rust.git#b61fef3e6d47114f86e5e16e26f7013e9fa8071e" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "kernel32-sys" @@ -243,6 +254,15 @@ dependencies = [ "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "num" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num_cpus" version = "0.2.6" @@ -298,14 +318,6 @@ name = "regex-syntax" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "registry" -version = "0.1.0" -dependencies = [ - "curl 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rustc-serialize" version = "0.3.14" diff --git a/Cargo.toml b/Cargo.toml index 61f16daca..70635a2fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,13 @@ version = "0.4.0" authors = ["Yehuda Katz ", "Carl Lerche ", "Alex Crichton "] +license = "MIT/Apache-2.0" +homepage = "https://crates.io" +repository = "https://github.com/rust-lang/cargo" +documentation = "http://doc.crates.io" +description = """ +Cargo, a package manager for Rust. +""" [lib] name = "cargo" @@ -25,7 +32,7 @@ libgit2-sys = "0.2" log = "0.3" num_cpus = "0.2" regex = "0.1" -registry = { path = "src/registry" } +crates-io = { path = "src/crates-io", version = "0.1" } rustc-serialize = "0.3" semver = "0.1" tar = { version = "0.2", features = ["nightly"] } @@ -38,7 +45,7 @@ winapi = "0.2" [dev-dependencies] tempdir = "0.3" -hamcrest = { git = "https://github.com/carllerche/hamcrest-rust.git" } +hamcrest = "0.1" bufstream = "0.1" filetime = "0.1" diff --git a/Makefile.in b/Makefile.in index a8d189ba1..d7322076e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -133,7 +133,11 @@ ASSETS := CNAME images/noise.png images/forkme.png images/Cargo-Logo-Small.png \ images/search.png doc: $(foreach doc,$(DOCS),target/doc/$(doc).html) \ - $(foreach asset,$(ASSETS),target/doc/$(asset)) + $(foreach asset,$(ASSETS),target/doc/$(asset)) \ + target/doc/cargo/index.html + +target/doc/cargo/index.html: + $(CARGO) doc --no-deps $(DOC_DIR)/%.html: src/doc/%.md src/doc/header.html src/doc/footer.html @mkdir -p $(@D) diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs index 33c83add0..1accb5e2c 100644 --- a/src/cargo/lib.rs +++ b/src/cargo/lib.rs @@ -3,6 +3,7 @@ #[cfg(test)] extern crate hamcrest; #[macro_use] extern crate log; +extern crate crates_io as registry; extern crate curl; extern crate docopt; extern crate filetime; @@ -13,7 +14,6 @@ extern crate libc; extern crate libgit2_sys; extern crate num_cpus; extern crate regex; -extern crate registry; extern crate rustc_serialize; extern crate semver; extern crate tar; diff --git a/src/crates-io/Cargo.toml b/src/crates-io/Cargo.toml new file mode 100644 index 000000000..70068ec5b --- /dev/null +++ b/src/crates-io/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "crates-io" +version = "0.1.0" +authors = ["Alex Crichton "] +license = "MIT/Apache-2.0" +repository = "https://github.com/rust-lang/cargo" +description = """ +Helpers for interacting with crates.io +""" + +[lib] +name = "crates_io" +path = "lib.rs" + +[dependencies] +curl = "0.2" +rustc-serialize = "0.3" diff --git a/src/registry/lib.rs b/src/crates-io/lib.rs similarity index 100% rename from src/registry/lib.rs rename to src/crates-io/lib.rs diff --git a/src/registry/Cargo.toml b/src/registry/Cargo.toml deleted file mode 100644 index 622f99ec4..000000000 --- a/src/registry/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "registry" -version = "0.1.0" -authors = ["Alex Crichton "] - -[lib] -name = "registry" -path = "lib.rs" - -[dependencies] -curl = "0.2" -rustc-serialize = "0.3" -- 2.30.2